<template>
  <div>
    <div class="form">
      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="190px" class="demo-ruleForm">
        <el-form-item label="用户下单后超时" prop="name">
          <el-input v-model="ruleForm.litemall_order_unpaid"></el-input>
          <!-- <el-input-group>
            分钟
          </el-input-group>
          <span>用户未付款，则订单自动取消</span> -->
        </el-form-item>
        <el-form-item label="订单发货后超期" prop="name">
          <el-input v-model="ruleForm.litemall_order_unconfirm"></el-input>
        </el-form-item>
        <el-form-item label="确认收货后超期" prop="name">
          <el-input v-model="ruleForm.litemall_order_comment"></el-input>
        </el-form-item>
        <el-form-item label="" prop="name">
          <el-row>
            <el-button>取消</el-button>
            <el-button type="primary" @click="change">确定</el-button>
          </el-row>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>

<script>
import { yonghu,yonghu2 } from '@/api/pzgl/ddpz.js';
export default {
  name: 'DocumentsOrder',

  data() {
    return {
      ruleForm:{
        litemall_order_unpaid:'',
        litemall_order_unconfirm:"",
        litemall_order_comment:"",

      },


      rules: {
        name: [
          { required: true, message: '请输入活动名称', trigger: 'blur' },
          { min: 1, max: 20, message: '长度在 1 到 20 个字符', trigger: 'blur' }
        ],
      }
    };
  },

  mounted() {
    this.show()
  },

  methods: {
    change(){
      yonghu2({
        ...this.ruleForm

      }).then((res) =>{
        console.log(res);
        
      })
    },
    show(){
      yonghu()
        .then((res) => {
          console.log(res);
          this.ruleForm.litemall_order_unpaid=res.data.litemall_order_unpaid
          this.ruleForm.litemall_order_unconfirm=res.data.litemall_order_unconfirm
          this.ruleForm.litemall_order_comment=res.data.litemall_order_comment
        })
    }
  },
};
</script>